{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "646cd4d7-e93a-46ba-868b-88149ba942e0",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 配置，config\n",
    "llm:\n",
    "  api_type: 'gemini'\n",
    "  api_key: 'AIzaSyDqEzO8EqAA_nOKWhheoijjkxZxQdT69S8'\n",
    "  model: 'gemini-pro'\n",
    "mermaid:\n",
    "  engine: \"nodejs\"\n",
    "  path: \"mmdc\"\n",
    "  puppeteer_config: \"/app/metagpt/config/puppeteer-config.json\"\n",
    "  pyppeteer_path: \"/usr/bin/chromium\"\n",
    "\n",
    "# 运行\n",
    "# Step 1: Download metagpt official image and prepare config2.yaml\n",
    "docker pull metagpt/metagpt:latest\n",
    "mkdir -p ~/metagpt/{config,workspace}\n",
    "docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config2.yaml > ~/metagpt/config/config2.yaml\n",
    "vim ~/metagpt/config/config2.yaml # Change the config\n",
    "\n",
    "# Step 2: Run metagpt demo with container\n",
    "docker run --rm \\\n",
    "    --privileged \\\n",
    "    -v ~/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \\\n",
    "    -v ~/metagpt/workspace:/app/metagpt/workspace \\\n",
    "    metagpt/metagpt:latest \\\n",
    "    metagpt \"写一个管理用户游泳数据的微信小程序。要求：前后端+数据都有，要有安装部署文档，要有mock数据，要有测试日志。\""
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
